package com.zzw.thread;

public class DrawSynThread extends Thread {

	private AccountSyn accountSyn;
	private double drawAmount;
	public DrawSynThread(){
		
	}
	
	public DrawSynThread(String name,AccountSyn accountSyn,double drawAmount){
		super(name);
		this.accountSyn = accountSyn;
		this.drawAmount = drawAmount;
	}
	
	public void run(){
		for(int i = 0;i < 10;i++){
			System.out.println("" + i + "");
			accountSyn.draw(drawAmount);
		}
	}
}